<script setup>
import { defineProps } from "vue";
defineProps({
  title: {
    required: true,
    type: String,
  },
  isShowBtn: {
    type: Boolean,
    default: true,
  },
});
</script>
<template>
  <el-card class="pageContainer">
    <template #header>
      <div class="card-header">
        <span>{{ title }}</span>
        <div class="rightBtn" v-if="isShowBtn">
          <slot name="extra"></slot>
        </div>
      </div>
    </template>
    <slot></slot>
  </el-card>
</template>
<style lang="scss" scoped>
.pageContainer {
  min-height: 100%;
  min-width: 480px;
  .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
}
</style>
